package com.hzzftech.watchdog.busi.service.impl;

import java.util.List;

import com.hzzftech.watchdog.busi.core.executor.starter.KettleEnvironmentStarter;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.repository.RepositoryDirectory;
import org.pentaho.di.repository.kdr.KettleDatabaseRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzzftech.watchdog.busi.mapper.RJobMapper;
import com.hzzftech.watchdog.busi.domain.RJob;
import com.hzzftech.watchdog.busi.service.IRJobService;
import com.hzzftech.watchdog.common.core.text.Convert;

/**
 * 数据库资源库_jobService业务层处理
 * 
 * @author kt-watchdog
 * @date 2022-01-27
 */
@Service
public class RJobServiceImpl implements IRJobService 
{
    @Autowired
    private RJobMapper rJobMapper;

    public static Logger logger = LoggerFactory.getLogger(RJobServiceImpl.class);

    /**
     * 查询数据库资源库_job
     * 
     * @param idJob 数据库资源库_job主键
     * @return 数据库资源库_job
     */
    @Override
    public RJob selectRJobByIdJob(Long idJob)
    {
        return rJobMapper.selectRJobByIdJob(idJob);
    }

    /**
     * 查询数据库资源库_job列表
     * 
     * @param rJob 数据库资源库_job
     * @return 数据库资源库_job
     */
    @Override
    public List<RJob> selectRJobList(RJob rJob)
    {
        return rJobMapper.selectRJobList(rJob);
    }

    /**
     * 新增数据库资源库_job
     * 
     * @param rJob 数据库资源库_job
     * @return 结果
     */
    @Override
    public int insertRJob(RJob rJob)
    {
        return rJobMapper.insertRJob(rJob);
    }

    /**
     * 修改数据库资源库_job
     * 
     * @param rJob 数据库资源库_job
     * @return 结果
     */
    @Override
    public int updateRJob(RJob rJob)
    {
        return rJobMapper.updateRJob(rJob);
    }

    /**
     * 批量删除数据库资源库_job
     * 
     * @param idJobs 需要删除的数据库资源库_job主键
     * @return 结果
     */
    @Override
    public int deleteRJobByIdJobs(String idJobs)
    {
        return rJobMapper.deleteRJobByIdJobs(Convert.toStrArray(idJobs));
    }

    /**
     * 删除数据库资源库_job信息
     * 
     * @param idJob 数据库资源库_job主键
     * @return 结果
     */
    @Override
    public int deleteRJobByIdJob(Long idJob)
    {
        return rJobMapper.deleteRJobByIdJob(idJob);
    }
}
